package com.yanqu.road.server.cmd.activity.huashigang;

import com.yanqu.road.entity.log.LogHuaShiGangEventLog;
import com.yanqu.road.pb.huashigang.HuaShiGangProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.huashigang.HuaShiGangMgr;
import com.yanqu.road.server.manger.log.AutoLogMgr;
import com.yanqu.road.server.manger.log.LogMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;

/**
 * @Author wpj
 * @Date 2020/10/27
 */
@Cmd(code = GameProtocol.S_HUA_SHI_GANG_NOTIFY_EVENT_LOG, desc = "日志")
public class HuaShiGangEventLogFromCrossCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        HuaShiGangProto.HuaShiGangEventLog msg = HuaShiGangProto.HuaShiGangEventLog.parseFrom(packet.getBytes());
        AutoLogMgr.add(new LogHuaShiGangEventLog(msg.getActivityId(), HuaShiGangMgr.getChildType(), player.getUserId(), msg.getEventType(), msg.getEventId()));
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
